package top.tungsword.webconsole.util;

import com.alibaba.fastjson.JSON;

/**
 * @author chenji.yu
 * @date 2020/4/22 9:31
 * @description
 */
public class JsonUtil {
    public static String toJsonString(Object object){
        return JSON.toJSONString(object);
    }

    public static <T> T String2Object(String jsonStr, Class<T> clazz){
        return JSON.parseObject(jsonStr, clazz);
    }
}
